<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id='root'>
        <div :title="message">{{message}}</div>
        <!-- 动态属性 -->
        <div :[name]="message">{{message}}</div>
        <div v-once>{{message}}</div>
        <div v-if="show">show</div>
        <div v-else>else</div>
        <button @click="handleclick">click</button>
        <!-- 动态属性 -->
        <button @[event]="handleclick">click</button>
        <hr>
        <form action="https://www.baidu.com" @click.prevent='handleclick'>
            <button type="submit">提交</button>
        </form>
    </div>
    <script>
        let app = Vue.createApp({
            data() {
                return {
                    message:'hello world',
                    show:true,
                    name:'title',
                    event:'click'
                }
            },
           methods:{
               handleclick(){
                   alert('click')
               }
           }
        })

        app.mount('#root')
    </script>
</body>
</html>